{{define "component/server"}}
<div class="ui tiny server modal transition hidden">
    <div class="header">添加服务器</div>
    <div class="content">
        <form id="serverForm" class="ui form">
            <input type="hidden" name="id">
            <div class="field">
                <label>名称</label>
                <input type="text" name="name" placeholder="上海-联通">
            </div>
            <div class="field">
                <label>分组</label>
                <input type="text" name="Tag" placeholder="华东数据中心">
            </div>
            <div class="field">
                <label>排序</label>
                <input type="number" name="DisplayIndex" placeholder="数值越大越靠前">
            </div>
            <div class="secret field">
                <label>密钥</label>
                <input type="text" name="secret">
            </div>
            <div class="field">
                <label>说明</label>
                <textarea name="Note"></textarea>
            </div>

            <div class="command field">
                <label>Linux 安装指令</label>
                <div class="ui message">
                    {{if .Conf.GRPCHost}}
                    curl -L https://cdn.jsdelivr.net/gh/xos/probe@master/script/probe.sh -o probe.sh && chmod +x probe.sh && chmod +x probe.sh && ./probe.sh install_agent <code class="command">{{.Conf.GRPCHost}}</code> <code
                        class="command">{{if .Conf.ProxyGRPCPort}}{{.Conf.ProxyGRPCPort}}{{else}}{{.Conf.GRPCPort}}{{end}}</code> <code
                        class="command hostSecret"></code> <code class="command">{{if .Conf.TLS}}--tls{{end}}</code>
                    {{else}}
                    请先在设置页面配置 后端探针配置
                    {{end}}
                </div>
            </div>
        </form>
    </div>
    <div class=" actions">
        <div class="ui negative button">取消</div>
        <button class="ui positive probe-primary-btn right labeled icon button">确认<i class="checkmark icon"></i>
        </button>
    </div>
</div>
{{end}}